package com.java01.apache.commons.io;

import java.io.File;
import java.io.FileInputStream;

import org.apache.commons.io.IOUtils;

public class InputStreamToByteArray {

	public static void main(String[] args) {
		File src = new File("D:/srcFile");

		try {
			byte[] byteArray=IOUtils.toByteArray(new FileInputStream(src));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
